import re
obj = re.compile(r'ag_mgmtd.dest_netcfg.*?dest_ip(?P<ip>.*?),dest_mask(?P<mask>.*?),gw(?P<gateway>.*?)',re.S)
# it = obj.finditer()
with open(r'day05 模块\appgate.conf',mode='r',encoding='utf-8') as f:
    content = f.read()
    it = obj.findall(content)
    for el in it:
        print("ip","mask","gateway")  